Problem Description:
There is an issue with the setPageSize method of QPrinter in certain versions of PySide6, PyQt6, and some versions of PyQt5.
Solution:
The setPageSize method works properly in the PyQt 5.13.0 version.
Recommendation:
If possible,downgrade to PyQt 5.13.0 version, or look for specific fixes regarding the setPageSize issue.
bug i have not solution in PySide6 version, I need solution too!!!!!